<include file="Public/head" />
<include file="Public/sider" />
<style>
    table{
        border-collapse: inherit !important;
    }
    .ncsc-order-contnet thead td {
        background-color: #f5f5f5;
    }
    .ncsc-order-contnet tfoot td {
        padding: 10px 0;
    }

    .ncsc-order-contnet h3 {
        background-color: #f5f5f5;
        clear: both;
        color: #000;
        font-size: 14px;
        font-weight: 600;
        line-height: 22px;
        padding: 5px 0 5px 12px;
    }
    h3 {
        font-size: 18px;
    }
    .ncsc-order-contnet  td .sum em {
        color: #c00;
        font: 16px/24px Verdana,Arial;
        margin: 0 4px;
        vertical-align: bottom;
    }
    .ncsc-order-step dl.step-first{
        margin-left: 0;
    }
    .ncsc-order-contnet h3{
        display: inline-block;
    }
</style>

<div id="layoutRight" class="ncsc-layout-right">
    <div class="ncsc-path"><i class="icon-desktop"></i>商家管理中心<i class="icon-angle-right"></i>订单物流<i class="icon-angle-right"></i>订单详情</div>
    <div class="main-content" id="mainContent">

        <div class="main-content" id="mainContent">

            <div class="ncsc-oredr-show">
                <div style="" class="ncsc-order-info" >
                    <div class="ncsc-order-condition">
                        <a class="ncbtn ncbtn-grapefruit mt5" target="_blank"   href="{:U('order_Print',['id'=>$orderOne['id']])}"  ata-original-title="打印配货单"><i class="fa fa-print"></i>打印配货单</a>

                    </div>
                </div>
                <div class="ncsc-order-info" style="margin-top:30px">
                    <div class="ncsc-order-details">
                        <div class="title">订单信息</div>
                        <div class="content">
                            <dl>
                                <dt>收&nbsp;&nbsp;货&nbsp;&nbsp;人：</dt>
                                <dd>{$orderOne['order_address']['uname']}&nbsp; {$orderOne['order_address']['mobile']}&nbsp;
                                    {$orderOne['order_address']['province']}
                                    {$orderOne['order_address']['city']}
                                    {$orderOne['order_address']['area']}
                                    {$orderOne['order_address']['address']}</dd>
                            </dl>
                            <dl>
                                <dt>支付方式：</dt>
                                <dd>
                                    <if condition="$orderOne['exchange_type'] eq 0">
                                        电子货币
                                        <else/>
                                        七彩币
                                    </if>
                                </dd>
                            </dl>
                            <dl style="display: none">
                                <dt>发&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;票：</dt>
                                <dd></dd>
                            </dl>
                            <dl>
                                <dt>买家留言：</dt>
                                <dd>{$orderOne['message']}</dd>
                            </dl>
                            <dl class="line">
                                <dt>订单编号：</dt>
                                <dd>{$orderOne['order_sn']}</dd>
                            </dl>
                            <dl >
                                <dt>配送方式：</dt>
                                <dd>{$orderOne['shipping_name']}</dd>
                            </dl>
                            <dl>
                                <dt></dt>
                                <dd></dd>
                            </dl>
                        </div>
                    </div>
                    <div class="ncsc-order-condition">
                        <dl>
                            <dt><i class="icon-ok-circle green"></i>订单状态：</dt>
                            <dd>{$orderOne['state_name']}</dd>
                        </dl>
                        <if condition="$orderOne['order_state'] eq 20">
                            <if condition="$orderOne['is_reminder'] eq 1">
                                <ul style="">
                                    <li>有催单</li>
                                </ul>
                            </if>

                        </if>

                    </div>
                </div>

                <div class="ncsc-order-contnet">
                    <table class="ncsc-default-table order">
                        <thead>
                        <tr>
                            <th class="w10">&nbsp;</th>
                            <th colspan="2">商品</th>
                            <th class="w120">单价(
                                <if condition="$orderOne['exchange_type'] eq 0">
                                   元
                                    <else/>
                                    七彩币
                                </if>
                                )</th>
                            <th class="w60">数量</th>
                            <th class="w100">规格属性</th>
                            <th class="w200">会员折扣价</th>
                            <th class="w200">有退货</th>
                            <th class="w100">说明</th>
                        </tr>
                        </thead>
                        <tbody>
                        <volist name="orderOne['order_Goods']" id="vo">
                            <tr class="bd-line">
                                <td>&nbsp;</td>
                                <td class="w50"><div class="pic-thumb">
                                    <a target="_blank"><img src="{$vo.goods_image}"></a></div>
                                </td>
                                <td class="tl">
                                    <dl class="goods-name">
                                        <dt><a target="_blank">{$vo.goods_name}</a></dt>
                                    </dl>
                                </td>
                                <td>
                                    <if condition="$orderOne['exchange_type'] eq 0">
                                        {$vo.goods_money} <p class="green"></p>
                                        <else/>
                                        {$vo.goods_sell_price} <p class="green"></p>
                                    </if>
                                </td>
                                <td>{$vo.goods_num}</td>
                                <td>{$vo.goods_spec}</td>
                                <td>
                                    <if condition="$orderOne['exchange_type'] eq 0">
                                        {$vo.money}
                                        <else/>
                                        {$vo.sell_price}
                                    </if>
                                </td>
                                <td>
                                    <if condition="$vo.refund_reason neq 0">
                                        <select id="{$vo.id}" name="refund_approval_t">
                                            <option <if condition="$vo.refund_approval eq 0">
                                            selected="selected"
                                        </if> value="0">退货待审核</option>
                                            <option <if condition="$vo.refund_approval eq 1">
                                            selected="selected"
                                        </if> value="1">退货允许</option>
                                            <option <if condition="$vo.refund_approval eq 2">
                                            selected="selected"
                                        </if> value="2">退货关闭</option>
                                        </select>
                                        <a class="ncbtn ncbtn-grapefruit mt5" style="position: relative;top:-3px" href="{:U('refund_reason',['id'=>$vo['id']])}">退货原因</a>
                                        <else/>
                                        无退货
                                    </if>

                                </td>
                                <td>
                                    <if condition="$vo.refund_reason neq 0">
                                        <if condition="$vo.refund_order_state gt 25">
                                            已经发货看有没有损坏再退
                                            <else/>
                                            未发货可直接退
                                        </if>
                                    </if>
                                </td>
                            </tr>
                        </volist>
                        <script>
                            $(function(){

                                $('select[id]').change(function(){
                                    $id = $(this).attr('id');
                                    $value = $(this).val();
                                    $.get('{:U("refundApproval")}',{id:$id,refundApproval:$value},function(res){
                                        $('select[id='+$id+']').children('option').removeAttr('selected');
                                        $('select[id='+$id+']').children('option[value='+res.data.refund_approval+']').attr('selected','selected');
                                    });
                                });
                            });
                        </script>
                        </tbody>
                        <tfoot>
                        <tr>
                            <td colspan="20">
                                <dl class="sum">
                                    <dt>小计：</dt>
                                    <dd>
                                        <if condition="$orderOne['exchange_type'] eq 0">
                                            <em>{$orderOne.order_Goods_total_money}</em>元
                                            <else/>
                                            <em>{$orderOne.order_Goods_total_sell}</em>七彩币
                                        </if>

                                    </dd>
                                </dl></td>
                        </tr>
                        </tfoot>
                    </table>
                </div>
            </div>

            <!-- 费用信息 -->
            <if condition="$orderOne['exchange_type'] eq 0">
                <div class="ncsc-order-contnet">
                    <table class="ncsc-default-table order">
                        <thead>
                        <tr>
                            <td colspan="20"><dl class="freight">
                                <h3>费用信息</h3>
                                <span style="display: none"><a title="修改费用信息" class="ncbtn-mini" target="_blank" href="/index.php/seller/Order/editprice/order_id/344.html"><i class="icon-edit"></i>修改费用信息</a></span>
                            </dl></td>
                        </tr>
                        <tr>
                            <th class="w100">小计</th>
                            <th class="w100">运费</th>
                            <th class="w200">优惠券抵扣</th>
                            <th class="w100">应付</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr class="bd-line">
                            <td class="w100"> {$orderOne.order_Goods_total_money}</td>
                            <td class="w100">+{$orderOne.shipping_fee}</td>
                            <td class="w100">-{$youhuiquan}</td>

                            <td class="w100">
                                <dl class="sum"><em>{$orderOne['order_Goods_total_money']+$orderOne['shipping_fee']-$youhuiquan} </em>元
                                </dl>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <else/>

                <div class="ncsc-order-contnet">
                    <table class="ncsc-default-table order">
                        <thead>
                        <tr>
                            <td colspan="20"><dl class="freight">
                                <h3>费用信息</h3>
                                <span style="display: none"><a title="修改费用信息" class="ncbtn-mini" target="_blank" href="/index.php/seller/Order/editprice/order_id/344.html"><i class="icon-edit"></i>修改费用信息</a></span>
                            </dl></td>
                        </tr>
                        <tr>
                            <th class="w100">小计</th>
                            <th class="w100">运费</th>
                            <th class="w200">优惠券抵扣</th>
                            <th class="w100">应付</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr class="bd-line">
                            <td class="w100"> {$orderOne.order_Goods_total_sell}</td>
                            <td class="w100">+{$orderOne.shipping_fee}</td>
                            <td class="w100">-{$youhuiquan}</td>
                            <td class="w100">
                                <dl class="sum"><em>{$orderOne['order_Goods_total_sell']-$youhuiquan}</em>七彩币&nbsp;运费<em>{$orderOne.shipping_fee}</em>
                                </dl>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>

            </if>



            <if condition="$orderOne.order_state gt 19">

                <if condition="$orderOne.shipping_code neq ''">
                    <!--操作信息-->
                    <div class="ncsc-form-goods" style="margin-top:30px">

                        <dl>
                            <dt>快递单号</dt>
                            <dd>
                                {$orderOne.shipping_code}
                            </dd>
                        </dl>
                    </div>
                    <else/>
                    <!--操作信息-->
                    <div class="ncsc-form-goods" style="margin-top:30px">
                        <h3 id="demo1">操作</h3>
                        <dl>
                            <dt>操作备注</dt>
                            <dd>
                                <form id="order-action">
                                    <textarea name="shipping_code" placeholder="输入快递单号" class="textarea h60 w400 valid"></textarea>
                                </form>
                            </dd>
                        </dl>
                        <dl>
                            <dt>填写快递单号</dt>
                            <dd>
                                <a id="send" class="ncbtn ncbtn-grapefruit mt5">填写快递单号</a>
                            </dd>
                            <script>
                                $(function(){
                                    $("#send").click(function(){
                                        $shipping_code = $('textarea[name=shipping_code]').val();
                                        $id = '{$orderOne.id}';
                                       // alert($shipping_code);
                                       // alert($id);
                                        $.post('{:U("addShippingCode")}',{shipping_code:$shipping_code,id:$id},function(res){
                                            //
                                            if(res.res==1){
                                                layer.msg(res.msg, {icon: 1});

                                                setTimeout("window.location.reload();",2000)

                                            }
                                        });
                                        return false;
                                    });
                                });
                            </script>

                        </dl>
                    </div>
                </if>


            </if>


            <!-- 操作记录 -->


        </div>
        <script>
           /* function pay_cancel(obj){
                var url =  $(obj).attr('data-url');
                layer.open({
                    type: 2,
                    title: '退款操作',
                    shadeClose: true,
                    shade: 0.8,
                    area: ['45%', '50%'],
                    content: url,
                });
            }
            //取消付款
            function pay_callback(s){
                if(s==1){
                    layer.msg('操作成功', {icon: 1});
                    layer.closeAll('iframe');
                    location.href =	location.href;
                }else{
                    layer.msg('操作失败', {icon: 3});
                    layer.closeAll('iframe');
                    location.href =	location.href;
                }
            }

            // 弹出退换货商品
            function selectGoods2(order_id){
                var url = "/index.php?m=Seller&c=Order&a=get_order_goods&order_id="+order_id;
                layer.open({
                    type: 2,
                    title: '选择商品',
                    shadeClose: true,
                    shade: 0.8,
                    area: ['60%', '60%'],
                    content: url,
                });
            }
            // 申请退换货
            function call_back(order_id,goods_id)
            {
                var url = "/index.php?m=Seller&c=Order&a=add_return_goods&order_id="+order_id+"&goods_id="+goods_id;
                location.href = url;
            }*/
        </script>
    </div>
</div>
</div>
<div id="cti">
    <div class="wrapper">
        <ul>
        </ul>
    </div>
</div>
<div id="faq">
    <div class="wrapper">
    </div>
</div>
<include file="Public/foot" />